<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>高压氧舱消毒记录表单-form</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .form-container {
            width: 100%;
            padding-top: 20px;
        }

        .form-container>h2 {
            margin: 0 auto;
            width: 500px;
            text-align: center;
        }

        .form-container>.form-wrapper {
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            padding-top: 20px;
        }

        .form-container>.form-wrapper>div {
            width: 50%;
            margin-top: 10px;
        }

        .form-container>.form-wrapper>div>span {
            vertical-align: middle;
        }

        .form-container>.form-wrapper>div>span:nth-child(1) {
            display: inline-block;
            width: 30%;
            height: 30px;
            font-size: 14px;
            text-align: center;
        }

        .form-container>.form-wrapper>div>input {
            display: inline-block;
            width: 70%;
            height: 25px !important;
            font-size: 14px;
            text-align: center;
            vertical-align: middle;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.3);
        }

        .aui-form-list-wrapper,
        .aui-form-list-info-wrapper {
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .aui-form-list-wrapper>li {
            width: 33.33%;
        }

        .aui-form-list-wrapper-content {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .header {
            text-align: center;
        }

        .aui-form-list-wrapper-content>li {
            width: 50%;
        }

        .aui-list-item-label {
            width: 60% !important;
        }

        .form-submit {
            width: 100%;
            text-align: center;
            margin-top: 50px;
        }

        .form-submit>button {
            width: 170px;
            height: 50px;
            text-align: center;
            background-color: #0064B0;
            color: #fff;
            padding-bottom: 10px;
            font-size: 20px;
        }

        .aui-list-item-input {
            color: #666 !important;
        }

        .aui-list-item-label,
        .aui-list-item-input,
        input[type="text"] {
            font-size: 0.6rem;
        }
    </style>
</head>

<body>
    <main id="app">
        <div class="form-container">
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper">
                    <!-- <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                日期：
                            </div>
                            <div class="aui-list-item-input" onclick="getDateTime()">
                                <input type="text" id="drTime">
                            </div>
                        </div>
                    </li> -->
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                日期：
                            </div>
                            <div class="aui-list-item-input" id="drTime" onclick="getDateTime()">
                                {{getDateTime}}
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                签名：
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="drAutograph" placeholder="请填写签名">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                主舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="drMcVentilation" value="1" checked
                                    id="drMcVentilation">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drMcGround" value="1" checked
                                    id="drMcGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="drMcBulkhead" value="1" checked
                                    id="drMcBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drMcMesa" value="1" checked
                                    id="drMcMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                副舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="drAcVentilation" value="1" checked
                                    id="drAcVentilation">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drAcGround" value="1" checked
                                    id="drAcGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="drAcBulkhead" value="1" checked
                                    id="F_ViceCaBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drAcMesa" value="1" checked
                                    id="drAcMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                过渡舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                通风：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="drTcVentilation" value="1" checked
                                    id="drTcVentilation">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                地面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drTcGround" value="1" checked
                                    id="drTcGround">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                舱壁：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="舱壁"> -->
                                <input class="aui-checkbox" type="checkbox" name="drTcBulkhead" value="1" checked
                                    id="drTcBulkhead">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                台面：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="台面"> -->
                                <input class="aui-checkbox" type="checkbox" name="drTcMesa" value="1" checked
                                    id="drTcMesa">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="form-submit">
            <button onclick="Insert_HO_YcDisinfectionRecord()">提交</button>
        </div>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    var vm;
    apiready = function () {
        vm = new Vue({
            el: '#app',
            data: {
                Query_UserList: [], //舱室操舱人员信息
                getDateTime: '选择日期',
                getTime: '选择时间'
            },
            created() {

            },
            watch: {
                searchInfo: function () { }
            },
            methods: {

            },
        })
    }
    // //选择时间
    // function getDateTime() {
    //     let _this = this;
    //     api.openPicker({
    //         type: 'date',
    //         title: '选择开始日期'
    //     }, function (ret, err) {
    //         if (ret) {
    //             var month = ret.month > 9 ? ret.month : '0' + ret.month;
    //             var day = ret.day > 9 ? ret.day : '0' + ret.day;
    //             vm.getDateTime = '' + ret.year +
    //                 '-' + month +
    //                 '-' + day
    //         }
    //     });
    // }


    function getTime() {
        api.openPicker({
            type: 'time',
            date: '08:30',
            title: '选择升压时间'
        }, function (ret, err) {
            if (ret) {
                vm.getTime = ret.hour +
                    ':' + ret.minute;
                console.log(ret.minute);
            }
        });
    }


    function closewin() {
        api.closeWin({
            name: 'disinfection-record-form'
        });
    }




    //添加高压氧消毒记录
    function Insert_HO_YcDisinfectionRecord() {

        //定义toast提示框
        var toast = new auiToast();
        var JsonStr = GetParameters();
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        if (JsonStr !== "") {
            $.ajax({
                url: Url_IP + '/disinfectioninspection/hodisinfectionrecord/insertHoDisinfectionRecord',
                type: 'post',
                async: false,
                contentType: "application/json",
                dataType: "json",
                data: JsonStr,
                success: function (result) {
                    /**
                     * 验证返回信息是否为空
                     */
                    if (result.success == true) {
                        /**
                         * 操作成功提醒
                         */
                        JumpPage();
                    } else {
                        /**
                         *  提示错误信息
                         */
                        toast.fail({
                            title: "加载失败",
                            duration: 2000
                        });
                    }
                },
                error: function (result) {
                    /**
                     *  提示错误信息
                     */
                    toast.fail({
                        title: "加载失败",
                        duration: 2000
                    });
                }
            })
        }
    }

    //跳转页面
    function JumpPage() {
        var dialog = new auiDialog();
        dialog.alert({
            title: "提示",
            msg: '操作成功，是否跳转消毒记录记录单',
            buttons: ['取消', '确定']
        }, function (ret) {
            if (ret.buttonIndex === 1) {

            } else if (ret.buttonIndex === 2) {
                api.openWin({
                    name: 'treatment-cabin-header',
                    url: './treatment-cabin-header.html',
                    pageParam: {}
                });
            }
        })
    }





    //获取参数添氧舱消毒记录
    function GetParameters() {
        var JsParms = new Object();
        //获取日期
        JsParms.drTime = $("#drTime").text();
        //签名
        JsParms.drAutograph = api.pageParam["userName"];
        //正舱通风
        JsParms.drMcVentilation = $api.val($api.dom("input[name='drMcVentilation']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drMcVentilation == undefined) {
            JsParms.drMcVentilation = 0;
        }
        //正舱地面
        JsParms.drMcGround = $api.val($api.dom("input[name='drMcGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drMcGround == undefined) {
            JsParms.drMcGround = 0;
        }
        //正舱舱壁
        JsParms.drMcBulkhead = $api.val($api.dom("input[name='drMcBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drMcBulkhead == undefined) {
            JsParms.drMcBulkhead = 0;
        }
        //正舱台面
        JsParms.drMcMesa = $api.val($api.dom("input[name='drMcMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drMcMesa == undefined) {
            JsParms.drMcMesa = 0;
        }
        //副舱通风
        JsParms.drAcVentilation = $api.val($api.dom("input[name='drAcVentilation']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drAcVentilation == undefined) {
            JsParms.drAcVentilation = 0;
        }
        //副舱地面
        JsParms.drAcGround = $api.val($api.dom("input[name='drAcGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drAcGround == undefined) {
            JsParms.drAcGround = 0;
        }
        //副舱舱壁
        JsParms.drAcBulkhead = $api.val($api.dom("input[name='drAcBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drAcBulkhead == undefined) {
            JsParms.drAcBulkhead = 0;
        }
        //副舱台面
        JsParms.drAcMesa = $api.val($api.dom("input[name='drAcMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drAcMesa == undefined) {
            JsParms.drAcMesa = 0;
        }
        //过度舱通风
        JsParms.drTcVentilation = $api.val($api.dom("input[name='drTcVentilation']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drTcVentilation == undefined) {
            JsParms.drTcVentilation = 0;
        }
        //过度舱地面
        JsParms.drTcGround = $api.val($api.dom("input[name='drTcGround']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drTcGround == undefined) {
            JsParms.drTcGround = 0;
        }
        //过度舱舱壁
        JsParms.drTcBulkhead = $api.val($api.dom("input[name='drTcBulkhead']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drTcBulkhead == undefined) {
            JsParms.drTcBulkhead = 0;
        }
        //过度舱台面
        JsParms.drTcMesa = $api.val($api.dom("input[name='drTcMesa']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.drTcMesa == undefined) {
            JsParms.drTcMesa = 0;
        }
        return JSON.stringify(JsParms);
    }





    function getDateTime() {
        api.openPicker({
            type: 'date_time',
            title: '选择开始日期'
        }, function (ret, err) {
            if (ret) {
                var year = ret.year;
                var month = ret.month;
                var day = ret.day;
                vm.getDateTime = '' + year +
                    '-' + month +
                    '-' + day
            }
        });
    }
</script>